import Vue from 'vue'
import VueRouter from 'vue-router'
// 引入组件
import Home from '../views/Home/Home.vue'
import Issue from '../views/Issue/Issue.vue'
import Mortgage from '../views/Mortgage/Mortgage.vue'
import Flow from '../views/Flow/Flow.vue'
import CoopBank from '../views/CoopBank/CoopBank.vue'
import Contact from '../views/Contact/Contact.vue'
import Publish from '../views/publish/Publish.vue'


Vue.use(VueRouter)

const routes = [{
        path: '/',
        component: Home
    },
    {
        path: '/home',
        name: 'Home',
        component: Home,
        meta: {
            title: "首页"
        }
    },
    {
        path: '/issue',
        name: 'Issue',
        component: Issue,
        meta: {
            title: '农户发布'
        }
    },
    {
        path: '/mortgage',
        name: 'Mortgage',
        component: Mortgage,
        meta: {
            title: '抵押产品'
        },
    },
    {
        path: '/flow',
        name: 'Flow',
        component: Flow,
        meta: {
            title: '抵押流程及资料'
        }
    },
    {
        path: '/coopbank',
        name: 'CoopBank',
        component: CoopBank,
        meta: {
            title: '合作银行'
        }
    },
    {
        path: '/contact',
        name: 'Contact',
        component: Contact,
        meta: {
            title: '联系我们'
        }
    },
    {
        path: '/publish',
        name: 'Publish',
        component: Publish,
        meta: {
            title: '发布抵押信息'
        }
    }
]

const router = new VueRouter({
    mode: 'history',
    base: '',
    routes,
    linkActiveClass: 'active'
})

export default router